package ua.kharkiv.khpi.tarasenko.diploma;

import java.util.ArrayList;

public class PseudoDB implements Cloneable {

    private ArrayList<Sequence> rows = new ArrayList<Sequence>();
    public int size = 0;

    public void addRow(Sequence row) {
        if (!row.isEmpty()) {
            getRows().add(row);
            size++;
        }
    }

    public ArrayList<Sequence> getRows() {
        return rows;
    }

    @Override
    public String toString() {
        String result = new String();

        int i = 1;
        for (Sequence s : rows) {

            result += "==>row " + i + ": " + s + "\n";
            i++;
        }

        return result;
    }

    public void setRows(ArrayList<Sequence> rows) {
        this.rows = rows;
    }
}
